module(..., package.seeall)
local UserData = requre "./UserData"
local seed = 1

local UserPools = {} --_G.Inst.UserPools;


--创建连接用户对象
function CreateConnectUser(value)
	local m_user = UserData:NewUserData();
	UserData:set_user_id(m_user,seed);
	UserData:set_login_name( m_user,"name" .. seed );
	UserData:set_socket(m_user,value);
	AddUser(seed,m_user);
	seed = seed+1;
	return m_user;
end	

--加入用户对象池
function AddUser(id,user)
	UserPools[user.user_id] = user;
end


--从用户对象池删除
function DelUser( user_id )
	UserPools[user_id] = nil;
end

function CheckRecvProc()

--	local i,v;
--　　for i,v in ipairs(UserPools) do
--		print(i,v);
--　　end

end	


